package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.core.support.auth.SysAuth;
import com.weixing.mall.provider.model.domain.AfterSale;
import com.weixing.mall.provider.model.dto.*;
import com.weixing.mall.provider.model.enums.ProductStatusEnum;
import com.weixing.mall.provider.model.query.*;
import com.weixing.mall.provider.model.vo.*;

import java.util.List;

/**
 * <p>
 * 订单模块-售后订单表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-20
 */
public interface IAfterSaleService extends IService<AfterSale> {

    void save(AfterSaleDto afterSaleDto, Long mid);

    AfterSaleRefundVo selectRefundDetails(long id);

    AfterSaleExchangeGoodsVo selectExchangeGoodsDetails(long id);

    IPage<AfterSaleVo> selectAfterSaleList(Page page, AfterSaleQuery afterSaleQuery);

    List<AfterSaleVo> selectAfterSaleList(AfterSaleQuery afterSaleQuery);

    void afterSaleChgType(AfterSaleChgTypeDto afterSaleChgTypeDto);

    void afterSaleChgProblem(AfterSaleChgProblemDto afterSaleChgProblemDto, SysAuth auth);

    void afterSaleChgStatus(AfterSaleChgStatusDto afterSaleChgStatusDto);

    void afterSaleChgIsHandle(AfterSaleChgIsHandleDto afterSaleChgIsHandleDto);

    AfterSaleOrderDetilVo selectAfterSaleOrderDetil(Long id);

    void afterSaleChgCustomerRemark(ChgCustomerRemarkDto chgCustomerRemarkDto);

    IPage<AfterSaleProblemVo> selectAfterSaleProblemList(Page page,AfterSaleProblemQuery afterSaleProblemQuery);

    IPage<AfterSaleListVo> getAfterSaleList(Page page,AfterSaleAppQuery afterSaleAppQuery);

    AfterSaleRefoundSuccessVo selectRefundSuccess(long id);

    AfterSaleExchangeGoodsSuccessVo selectExchangeGoodsSuccess(long id);

    IPage<AppDepotAfterSaleVo> selectAppDepotAfterSaleList(Page page,AppDepotAfterSaleQuery appDepotAfterSaleQuery);

    AppDepotAfterSaleDetilVo selectAppDepotAfterSaleDetil(AppDepotAfterSaleDetilQuery appDepotAfterSaleDetilQuery);

    AppAuditDetilVo selectAppAuditDetil(ScanCodeGoodsDetilQuery scanCodeGoodsDetilQuery);

    void receive(ReceiveOrderDto receiveOrderDto, Long uid);

    void refuse(ReceiveOrderDto receiveOrderDto, Long uid);

    void updateItemStausByOrderId(Long orderId, ProductStatusEnum productStatus);

    void updateAfterSaleStatusVal(Long id,Integer type, Integer afterSaleAudit, Integer  afterSaleResult,Integer productStatus,Long operatorId,String operatorName);

    void updateDepotInfo(Long id, String  depotSn,String depotLocation,String depotOrder);

    void confirmHandleAfterOrder(Long id,Long orderId);

    Long selfIncreasing(Long orderId);

    String chekBinding(SysAuth auth, Long orderId);

    String changeStatus(AfterSaleChgTypeDto afterSaleChgTypeDto);

    boolean checkOrder(AfterSaleDto afterSaleDto);

    AfterSale selectByOrderId(long orderId);

    IPage<AfterSaleVo> loadAfterSaleList(Page page, CustomerOrderQuery query);

    StaticVo loadAfterSaleTotal(CustomerOrderQuery query);
}
